<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="content-script-type" content="text/javascript" />
	<title>{if isset($pageTitle)}{$pageTitle} | {/if}{$title_prefix} Admin</title>
	<link rel="stylesheet" href="{$default_admin_theme_url}/css/reset.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="{$default_admin_theme_url}/css/layout.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="{$default_admin_theme_url}/css/forms.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="{$default_admin_theme_url}/css/tables.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="{$default_admin_theme_url}/css/type.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="{$default_admin_theme_url}/css/thickbox.css" type="text/css" media="screen" />
	<!--[if IE]>
		<link rel="stylesheet" href="{$default_admin_theme_url}css/ie.css" type="text/css" media="screen, projection" />
	<![endif]-->
	{include_css urls=$css_urls}

	<script src="{$admin_theme_url}/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="{$admin_theme_url}/js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="{$admin_theme_url}/js/jquery.flash.js" type="text/javascript" charset="utf-8"></script>

	{if $filebrowser_standalone}<script type="text/javascript" src="{url}/filebrowser/admin/standalonejs{/url}"></script>{/if}
	{if $tinymce}
		<script type="text/javascript" src="{url}/filebrowser/admin/tinymcejs{/url}"></script>
		<!--<script type="text/javascript" src="{$default_admin_theme_url}/js/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php"></script>-->
		<script type="text/javascript" src="{$admin_theme_url}/js/tiny_mce/tiny_mce.js"></script>
		{literal}
			<!-- compression is not working yet - crashes Firefox 2 Mac -->
			<!-- <script type="text/javascript">
				tinyMCE_GZ.init({
					plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,'+ 
				        'searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
					themes : 'advanced',
					languages : 'en',
					disk_cache : true,
					debug : false
				});
			</script> -->
			<script type="text/javascript">
				tinyMCE.init({
					mode : "exact",
					elements : "{/literal}{$tinymce_field_id}{literal}",
					entities: '',
					theme : "advanced",
					skin : "bdel",
					relative_urls : false,
					plugins : "advimage,media,paste,table",
					theme_advanced_toolbar_location : "top",
					theme_advanced_buttons1 : "formatselect,separator,charmap,separator,hr,seperator,bullist,numlist,separator,bold,italic,separator,code",
					theme_advanced_buttons2 : "undo,redo,separator,indent,outdent,separator,anchor,link,unlink,separator,image,media,separator,pastetext,pasteword",
			        theme_advanced_buttons3 : "table,tablecontrols",
			        paste_auto_cleanup_on_paste : true,
			        paste_preprocess : function(pl, o) {
			            // Content string containing the HTML from the clipboard
			            alert(o.content);
			        },
			        paste_postprocess : function(pl, o) {
			            // Content DOM node containing the DOM structure of the clipboard
			            alert(o.node.innerHTML);
			        },
					theme_advanced_blockformats : "p,h1,h2,h3,h4,blockquote",
				    height:"{/literal}{if $tinymceheight}{$tinymceheight}{else}300px{/if}{literal}",
				    width:"{/literal}{if $tinymcewidth}{$tinymcewidth}{else}430px{/if}{literal}"
					,file_browser_callback : "tinyBrowser"
					{/literal}
					{if isset($tinymce_css)}
						, content_css : "{$tinymce_css}"
					{/if}
					{literal}
					,setup : function(ed) {
					      ed.onPostRender.add(function(ed, cm) {
								$('.mceEditor').each(function(index) {
									if ($(this).prev("textarea").attr("readonly") == "readonly" || $(this).prev("textarea").attr("readonly") == true) {
										$(this).hide()
										$(this).prev("textarea").show()
									};
								});					
					      });
					   }
				});
			</script>
		{/literal}
	{/if}
	{include_js urls=$js_urls}
	<script src="{$admin_theme_url}/js/nav.js" type="text/javascript" charset="utf-8"></script>
	<script src="{$admin_theme_url}/js/general-admin.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="utilityTop">
				<ul id="utilityTopList">
					{if $locale_codes}
						<li>{html_options name=locale_picker options=$locale_codes selected=$locale_code id="locale_picker"}</li>
					{/if}
					<li>{t}Host Id{/t}: {$host_id}</li>
					<!-- TODO - change the view site href to use a view variable because
						the home page might not always be the root of the app -->
					<li><a href="{url}/{/url}" title="{t}View Site{/t}">{t}View Site{/t}</a></li>
					<li class="last"><a href="{url}/default/auth/logout{/url}" title="{t}Logout{/t}">{t}Logout{/t}</a></li>
				</ul>
			</div>
			<h1>{$site_name}</h1>
			<h2>{t}Administration{/t}</h2>
		</div>
		<div id="navTop">
			<ul id="navTopList" class="sf-menu">
				{include file="file:$admin_theme_global_path/_nav_recursive.tpl" items=$nav_items.admin_header.children}
			</ul>
		</div>
		<!-- START: MAIN CONTENT AREA -->
